from flask import Blueprint, jsonify, request

test_bp = Blueprint('test', __name__)


@test_bp.route('/')
def test_home():
    return "<h1>Hello,This is Test Page!<\h1>"


@test_bp.route('/agv/user/login', methods=['POST', 'GET'])
def agv_login():
    return jsonify(data=dict(req_data=request.json, token="123",
                             ), message="hello login", code=200)


@test_bp.route('/agv/user/info', methods=['GET'])
def agv_getinfo():
    data = dict(name="dl", avatar="123")
    return jsonify(data=data,
                   message="hello login", code=200) \



@test_bp.route('/agv/user/logout', methods=['POST'])
def agv_logout():
    return jsonify(data={},
                   message="hello login", code=200)
